<%--
  Created by IntelliJ IDEA.
  User: xiaodoudou
  Date: 2022/7/14
  Time: 16:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <form action="/captcha/test01" method="post" >
        <img src="${pageContext.request.contextPath}/captcha" style="width: 100px" onclick="refresh()" id="cap">
        <input type="text" name="captcha">
        <input type="submit" value="提交">

    </form>

        <script type="text/javascript">
           function refresh() {
               var img = document.getElementById("cap");
               img.src="${pageContext.request.contextPath}/captcha?"+new Date().getTime();
           }
        </script>
</body>
</html>
